<?xml version="1.0" encoding="UTF-8"?>

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html"
     xmlns:ui="http://java.sun.com/jsf/facelets"
     xmlns:p="http://primefaces.org/ui"
     template="../../Template.xhtml"
>
<ui:define name="title"></ui:define>
<ui:define name="body">

<script>


</script>
<h:form id="form">
<br/><br/>


<h2>Manage Stations</h2>

<p:tabView>
        <p:tab title="Manage Train Station">
<p:commandButton ajax="false" value="Add New" action="AddStation.xhtml" />
   

<br/><br/><br/><br/>

 
    <p:dataTable   var="car" value="#{stationMB.listeStation(0)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
      
        <p:column headerText="Id">
            <h:outputText value="#{car.idStation}" />
        </p:column>
        <p:column headerText="Station Name">
             <h:outputText value="#{car.intitule}" />
       </p:column>
       <p:column headerText="zip code">
             <h:outputText value="#{car.codePostal}" />
       </p:column>
        <p:column headerText="ville">
             <h:outputText value="#{car.villeStations.intitule}" />
       </p:column>
        <p:column headerText="Statut">
              <h:outputText value="#{car.statut}" />
      
        </p:column>
        <p:column style="width:32px;text-align: center">
             <p:commandButton ajax="false" action="#{stationMB.edit(car.idStation,0)}" icon="ui-icon ui-icon-pencil">
            </p:commandButton>
            <p:commandButton ajax="false" action="#{stationMB.Supprimer(car.idStation)}" icon="ui-icon ui-icon-close">
            </p:commandButton>
         </p:column>
    </p:dataTable>
	 </p:tab>
	 
	         <p:tab title="Manage Port">
<p:commandButton ajax="false" value="Add New" action="AddPort.xhtml" />
   

<br/><br/><br/><br/>

 
    <p:dataTable  var="car" value="#{stationMB.listeStation(1)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
      
        <p:column headerText="Id">
            <h:outputText value="#{car.idStation}" />
        </p:column>
        <p:column headerText="Station Name">
             <h:outputText value="#{car.intitule}" />
       </p:column>
       <p:column headerText="zip code">
             <h:outputText value="#{car.codePostal}" />
       </p:column>
        <p:column headerText="ville">
             <h:outputText value="#{car.villeStations.intitule}" />
       </p:column>
        <p:column headerText="Statut">
              <h:outputText value="#{car.statut}" />
      
        </p:column>
        <p:column style="width:32px;text-align: center">
             <p:commandButton ajax="false" action="#{stationMB.edit(car.idStation,1)}" icon="ui-icon ui-icon-pencil">
            </p:commandButton>
            <p:commandButton ajax="false" action="#{stationMB.Supprimer(car.idStation)}" icon="ui-icon ui-icon-close">
            </p:commandButton>
         </p:column>
    </p:dataTable>
    
	 </p:tab>
	 
	 
	         <p:tab title="Manage airport">
<p:commandButton ajax="false" value="Add New" action="AddAirPort.xhtml" />
   

<br/><br/><br/><br/>

 
    <p:dataTable   var="car" value="#{stationMB.listeStation(2)}" rows="10"
                         paginator="true"
                         paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
                         rowsPerPageTemplate="5,10,15" >
      
        <p:column headerText="Id">
            <h:outputText value="#{car.idStation}" />
        </p:column>
        <p:column headerText="Station Name">
             <h:outputText value="#{car.intitule}" />
       </p:column>
       <p:column headerText="zip code">
             <h:outputText value="#{car.codePostal}" />
       </p:column>
        <p:column headerText="ville">
             <h:outputText value="#{car.villeStations.intitule}" />
       </p:column>
        <p:column headerText="Statut">
              <h:outputText value="#{car.statut}" />
      
        </p:column>
        <p:column style="width:32px;text-align: center">
             <p:commandButton ajax="false" action="#{stationMB.edit(car.idStation,2)}" icon="ui-icon ui-icon-pencil">
            </p:commandButton>
            <p:commandButton ajax="false" action="#{stationMB.Supprimer(car.idStation)}" icon="ui-icon ui-icon-close">
            </p:commandButton>
         </p:column>
    </p:dataTable>
    
	 </p:tab>
	 
	 
	 
	 </p:tabView>
	
	 </h:form>
 <br/><br/><br/><br/>
</ui:define>

</ui:composition>